package pers.vankid.sessionkeeper.service;

import pers.vankid.common.model.authc.AuthcUser;
import pers.vankid.common.model.authc.AuthcUserResponse;

public interface SessionKeeperService {
    /**
     * 登陆
     * @param authcUser
     * @return
     * @throws Exception
     */
    String login(AuthcUser authcUser)throws Exception;

    /**
     * 注销
     * @param sign
     */
    void layout(String sign);
    /**
     * 检查登陆状态
     *
     * @param sign
     * @return
     */
    boolean checkLogin(String sign) throws Exception;

    /**
     * 获取登陆用户数据
     * @param sign
     * @return
     * @throws Exception
     */
    AuthcUserResponse getAuthcData(String sign)throws Exception;
    /**
     * 修改登陆用户数据
     * @param sign
     * @return
     * @throws Exception
     */
    void updateAuthcData(String sign,String json)throws Exception;


    /**
     * 清理过期数据
     */
    void clean();
}
